const filters = {
  formateTime: function (datetime) {
    return datetime ? datetime.substring(5,16).replace('-','/') : ''
  },
  formateEmpty: function (value) {
    return value ? value : '无'
  },
  formateStatus: function (value) {
    let statusDesc = ''
    switch (value) {
      case 1:
        statusDesc = '未审批'
        break
      case 2:
        statusDesc = '批准'
        break
      case 3:
        statusDesc = '驳回'
        break
      default:
        statusDesc = '无'
        break
    }
    return statusDesc
  },
  formateStatisTotal: function(value) {
    return value ? value : '0'
  },
}
export default (vm) => {
  Object.keys(filters).forEach(key => {
    vm.filter(key, filters[key])
  })
}